unit MainUnit;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, DES;

type
  TForm1 = class(TForm)
    edtMD5: TEdit;
    Label1: TLabel;
    edtEncrypt: TEdit;
    Label2: TLabel;
    btnEncrypt: TButton;
    procedure btnEncryptClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

const
   StringKey = '999';

function EncString(AIn: string): string;
begin
  Result := DES.EncryStrHex(AIn, StringKey);
end;

{$R *.dfm}

procedure TForm1.btnEncryptClick(Sender: TObject);
begin
  edtEncrypt.Text := EncString(Trim(edtMD5.Text));
end;

end.
